package com.haoma.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * Description:
 */
@Data
public class Photo {
    // id为自增
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String photoUrl;
    private Integer state;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;// 创建时间
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;// 更新时间
    @JsonIgnore // 忽略这个字段
    @TableLogic // 逻辑删除
    @TableField("is_deleted")
    private Integer isDeleted;
}
